﻿using CommunityToolkit.Mvvm.ComponentModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WpfControlLibrary.GridItems
{
    public class GridItemsClass
    {
        public List<GridItem> gridItems = new List<GridItem>();

        public void TestData()
        {
            gridItems.Add(new GridItem() { Name = "张三", Description = "历史被呼叫次数最多的中国人", Icon = "abccc" ,Title="叫我干啥"});
            gridItems.Add(new GridItem() { Name = "李四", Description = "历史被呼叫次数第二多的中国人", Icon = "abccc", Title = "有事去找张三，别找我" });
            gridItems.Add(new GridItem() { Name = "王五", Description = "历史被呼叫次数第三的中国人", Icon = "abccc", Title = "……zzz" });

            for (int i = 0; i < 100; i++)
            {
                var temp = new GridItem();
                temp.Name = $"名称测试{i}";
                temp.Description = $"Description测试{i}";
                temp.Icon = $"...";
                temp.Title = $"Title测试{i}";
                gridItems.Add(temp);
            }
        }
    }

    public partial class GridItem : ObservableObject
    {
        [ObservableProperty]
        private string? _name;

        [ObservableProperty]
        private string? _description;

        [ObservableProperty]
        private string? _icon;

        [ObservableProperty]
        private string? _title;
    }
}
